package it.irondev.appturismo.dao.example;

import java.util.ArrayList;
import java.util.List;

public class MediaExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MediaExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdmediaIsNull() {
            addCriterion("idMedia is null");
            return (Criteria) this;
        }

        public Criteria andIdmediaIsNotNull() {
            addCriterion("idMedia is not null");
            return (Criteria) this;
        }

        public Criteria andIdmediaEqualTo(Integer value) {
            addCriterion("idMedia =", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaNotEqualTo(Integer value) {
            addCriterion("idMedia <>", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaGreaterThan(Integer value) {
            addCriterion("idMedia >", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaGreaterThanOrEqualTo(Integer value) {
            addCriterion("idMedia >=", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaLessThan(Integer value) {
            addCriterion("idMedia <", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaLessThanOrEqualTo(Integer value) {
            addCriterion("idMedia <=", value, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaIn(List<Integer> values) {
            addCriterion("idMedia in", values, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaNotIn(List<Integer> values) {
            addCriterion("idMedia not in", values, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaBetween(Integer value1, Integer value2) {
            addCriterion("idMedia between", value1, value2, "idmedia");
            return (Criteria) this;
        }

        public Criteria andIdmediaNotBetween(Integer value1, Integer value2) {
            addCriterion("idMedia not between", value1, value2, "idmedia");
            return (Criteria) this;
        }

        public Criteria andUrlIsNull() {
            addCriterion("url is null");
            return (Criteria) this;
        }

        public Criteria andUrlIsNotNull() {
            addCriterion("url is not null");
            return (Criteria) this;
        }

        public Criteria andUrlEqualTo(String value) {
            addCriterion("url =", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotEqualTo(String value) {
            addCriterion("url <>", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThan(String value) {
            addCriterion("url >", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThanOrEqualTo(String value) {
            addCriterion("url >=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThan(String value) {
            addCriterion("url <", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThanOrEqualTo(String value) {
            addCriterion("url <=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLike(String value) {
            addCriterion("url like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotLike(String value) {
            addCriterion("url not like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlIn(List<String> values) {
            addCriterion("url in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotIn(List<String> values) {
            addCriterion("url not in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlBetween(String value1, String value2) {
            addCriterion("url between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotBetween(String value1, String value2) {
            addCriterion("url not between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(String value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(String value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(String value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(String value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(String value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(String value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLike(String value) {
            addCriterion("type like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotLike(String value) {
            addCriterion("type not like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<String> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<String> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(String value1, String value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(String value1, String value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andIdgalleryIsNull() {
            addCriterion("idGallery is null");
            return (Criteria) this;
        }

        public Criteria andIdgalleryIsNotNull() {
            addCriterion("idGallery is not null");
            return (Criteria) this;
        }

        public Criteria andIdgalleryEqualTo(Integer value) {
            addCriterion("idGallery =", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryNotEqualTo(Integer value) {
            addCriterion("idGallery <>", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryGreaterThan(Integer value) {
            addCriterion("idGallery >", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryGreaterThanOrEqualTo(Integer value) {
            addCriterion("idGallery >=", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryLessThan(Integer value) {
            addCriterion("idGallery <", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryLessThanOrEqualTo(Integer value) {
            addCriterion("idGallery <=", value, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryIn(List<Integer> values) {
            addCriterion("idGallery in", values, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryNotIn(List<Integer> values) {
            addCriterion("idGallery not in", values, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryBetween(Integer value1, Integer value2) {
            addCriterion("idGallery between", value1, value2, "idgallery");
            return (Criteria) this;
        }

        public Criteria andIdgalleryNotBetween(Integer value1, Integer value2) {
            addCriterion("idGallery not between", value1, value2, "idgallery");
            return (Criteria) this;
        }

        public Criteria andMediatypeIsNull() {
            addCriterion("mediaType is null");
            return (Criteria) this;
        }

        public Criteria andMediatypeIsNotNull() {
            addCriterion("mediaType is not null");
            return (Criteria) this;
        }

        public Criteria andMediatypeEqualTo(Integer value) {
            addCriterion("mediaType =", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeNotEqualTo(Integer value) {
            addCriterion("mediaType <>", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeGreaterThan(Integer value) {
            addCriterion("mediaType >", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("mediaType >=", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeLessThan(Integer value) {
            addCriterion("mediaType <", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeLessThanOrEqualTo(Integer value) {
            addCriterion("mediaType <=", value, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeIn(List<Integer> values) {
            addCriterion("mediaType in", values, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeNotIn(List<Integer> values) {
            addCriterion("mediaType not in", values, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeBetween(Integer value1, Integer value2) {
            addCriterion("mediaType between", value1, value2, "mediatype");
            return (Criteria) this;
        }

        public Criteria andMediatypeNotBetween(Integer value1, Integer value2) {
            addCriterion("mediaType not between", value1, value2, "mediatype");
            return (Criteria) this;
        }

        public Criteria andOrdinewebIsNull() {
            addCriterion("ordineweb is null");
            return (Criteria) this;
        }

        public Criteria andOrdinewebIsNotNull() {
            addCriterion("ordineweb is not null");
            return (Criteria) this;
        }

        public Criteria andOrdinewebEqualTo(Integer value) {
            addCriterion("ordineweb =", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebNotEqualTo(Integer value) {
            addCriterion("ordineweb <>", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebGreaterThan(Integer value) {
            addCriterion("ordineweb >", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebGreaterThanOrEqualTo(Integer value) {
            addCriterion("ordineweb >=", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebLessThan(Integer value) {
            addCriterion("ordineweb <", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebLessThanOrEqualTo(Integer value) {
            addCriterion("ordineweb <=", value, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebIn(List<Integer> values) {
            addCriterion("ordineweb in", values, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebNotIn(List<Integer> values) {
            addCriterion("ordineweb not in", values, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebBetween(Integer value1, Integer value2) {
            addCriterion("ordineweb between", value1, value2, "ordineweb");
            return (Criteria) this;
        }

        public Criteria andOrdinewebNotBetween(Integer value1, Integer value2) {
            addCriterion("ordineweb not between", value1, value2, "ordineweb");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}